import request from '@/utils/request.ts'


/*查询流程定义列表*/
export const processDefinitionList = (data:any) => {
    return request({
        url: '/flowable/definition/processDefinitionList',
        method: 'get',
        data: data
    })
}
/*删除流程定义*/
export const definitionDelete = (definitionId:string) => {
    return request({
        url: `/flowable/definition/delete/${definitionId}`,
        method: 'delete'
    })
}
/*流程状态改变*/
export const definitionStatus = (id:string,suspendState:string) => {
    return request({
        url: `/flowable/definition/status`,
        method: 'put',
        params: {
            id,
            suspendState
        }
    })
}

export const getProcessDefinition = (key:string) => {
    return request({
        url: `/flowable/definition/getProcessDefinition`,
        method: 'get',
        params: {
            key
        }
    })
}
export const getProcessDefinitionXml = (deploymentId:string) => {
    return request({
        url: `/flowable/definition/getProcessDefinitionXml`,
        method: 'get',
        params: {
            deploymentId
        }
    })
}

